﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="AndmebaasDataSet" targetNamespace="http://tempuri.org/AndmebaasDataSet.xsd" xmlns:mstns="http://tempuri.org/AndmebaasDataSet.xsd" xmlns="http://tempuri.org/AndmebaasDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="AndmebaasConnectionString1" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="AndmebaasConnectionString1 (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.LMDB.Properties.Settings.GlobalReference.Default.AndmebaasConnectionString1" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="KlientTableAdapter" GeneratorDataComponentClassName="KlientTableAdapter" Name="Klient" UserDataComponentName="KlientTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Klient" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [Klient] ([email], [id], [eesnimi], [perenimi], [aktiivne]) VALUES (@email, @id, @eesnimi, @perenimi, @aktiivne)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@email" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="email" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@eesnimi" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="eesnimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@perenimi" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="perenimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@aktiivne" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="aktiivne" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        *
FROM            Klient
where aktiivne not in ('K')</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="email" DataSetColumn="email" />
              <Mapping SourceColumn="eesnimi" DataSetColumn="eesnimi" />
              <Mapping SourceColumn="id" DataSetColumn="id" />
              <Mapping SourceColumn="perenimi" DataSetColumn="perenimi" />
              <Mapping SourceColumn="aktiivne" DataSetColumn="aktiivne" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Klient" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetKlientView" GetMethodModifier="Public" GetMethodName="GetKlientView" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetKlientView" UserSourceName="GetKlientView">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT aktiivne, eesnimi, email, id, perenimi FROM Klient WHERE (aktiivne = 'A')</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="KontrolliKustutamist" GetMethodModifier="Public" GetMethodName="KontrolliKustutamist" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="KontrolliKustutamist" UserSourceName="KontrolliKustutamist">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        a.id, b.*
FROM            Klient a, Laenutus b
where b.aktiivne='A' and b.id=@id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Expr1" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Klient" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="KontrolliMuutmist" GetMethodModifier="Public" GetMethodName="KontrolliMuutmist" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="KontrolliMuutmist" UserSourceName="KontrolliMuutmist">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT aktiivne, eesnimi, email, id, perenimi FROM Klient WHERE (id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="KustutaKlient" Modifier="Public" Name="KustutaKlient" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="KustutaKlient">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE Klient
Set aktiivne='K'
where id=@id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="LeiaKlient" Modifier="Public" Name="LeiaKlient" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="LeiaKlient">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT eesnimi + ' ' + perenimi FROM Klient where (id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\REIO\DOCUMENTS\KOOL\C#\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="LisaKlient" Modifier="Public" Name="LisaKlient" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="LisaKlient">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>INSERT INTO Klient
                         (eesnimi, perenimi, email, id, aktiivne)
VALUES        (@eesnimi,@perenimi,@mail,@id, 'A')</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="eesnimi" ColumnName="eesnimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@eesnimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="eesnimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="perenimi" ColumnName="perenimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@perenimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="perenimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="mail" ColumnName="email" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@mail" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="email" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="MuudaKlienti" Modifier="Public" Name="MuudaKlienti" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy3" UserSourceName="MuudaKlienti">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE       Klient
SET                eesnimi = @eesnimi, perenimi = @perenimi, email = @mail
WHERE        id =@id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="eesnimi" ColumnName="eesnimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@eesnimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="eesnimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="perenimi" ColumnName="perenimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@perenimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="perenimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="mail" ColumnName="email" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@mail" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="email" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Klient" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="OtsiKlient" GetMethodModifier="Public" GetMethodName="OtsiKlient" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="OtsiKlient" UserSourceName="OtsiKlient">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT aktiivne, eesnimi, email, id, perenimi FROM Klient WHERE (eesnimi = @eesnimi) OR (perenimi = @perenimi) OR (email = @email)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="eesnimi" ColumnName="eesnimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@eesnimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="eesnimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="perenimi" ColumnName="perenimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@perenimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="perenimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="email" ColumnName="email" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Klient" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@email" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="email" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="Unikaalne" Modifier="Public" Name="Unikaalne" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy4" UserSourceName="Unikaalne">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT MAX(id) FROM Klient</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="FilmTableAdapter" GeneratorDataComponentClassName="FilmTableAdapter" Name="Film" UserDataComponentName="FilmTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [Film] ([film_id], [aasta], [nimi], [zanr], [saadaval]) VALUES (@film_id, @aasta, @nimi, @zanr, @saadaval)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@film_id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@aasta" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="aasta" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@nimi" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="nimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@zanr" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="zanr" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@saadaval" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="saadaval" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        film_id, aasta, nimi, zanr, saadaval
FROM            Film
WHERE        (saadaval NOT IN ('K'))</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="film_id" DataSetColumn="film_id" />
              <Mapping SourceColumn="nimi" DataSetColumn="nimi" />
              <Mapping SourceColumn="zanr" DataSetColumn="zanr" />
              <Mapping SourceColumn="saadaval" DataSetColumn="saadaval" />
              <Mapping SourceColumn="aasta" DataSetColumn="aasta" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetFilmView" GetMethodModifier="Public" GetMethodName="GetFilmView" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetFilmView" UserSourceName="GetFilmView">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT aasta, film_id, nimi, saadaval, zanr FROM Film WHERE (saadaval = 'Y')</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateShortCommands="true" GeneratorSourceName="GetId" Modifier="Public" Name="GetId" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="GetId">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        pic
FROM            Film
WHERE        (film_id = @klient)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="klient" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@klient" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Laenutus" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="KontrolliKustutamist" GetMethodModifier="Public" GetMethodName="KontrolliKustutamist" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="KontrolliKustutamist" UserSourceName="KontrolliKustutamist">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT b.film_id FROM Film AS a CROSS JOIN Laenutus AS b WHERE (b.aktiivne = 'A') AND (b.film_id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="KontrolliMuutmist" GetMethodModifier="Public" GetMethodName="KontrolliMuutmist" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="KontrolliMuutmist" UserSourceName="KontrolliMuutmist">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT aasta, film_id, nimi, saadaval, zanr FROM Film WHERE (film_id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="KustutaFilm" Modifier="Public" Name="KustutaFilm" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="KustutaFilm">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE Film
set saadaval='K'
where film_id=@film_id</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="film_id" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@film_id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateShortCommands="true" GeneratorGetMethodName="LeidaFilm" GeneratorSourceName="LeiaFilm" Modifier="Public" Name="LeiaFilm" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="LeiaFilm">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT nimi FROM Film WHERE (film_id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="film_id" DataSourceName="[C:\USERS\REIO\DOCUMENTS\KOOL\C#\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="LisaFilm" Modifier="Public" Name="LisaFilm" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy3" UserSourceName="LisaFilm">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>INSERT INTO Film
                         (film_id, nimi, zanr, aasta, saadaval)
VALUES        (@film_id,@nimi,@zanr,@aasta, 'Y')</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="film_id" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@film_id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="nimi" ColumnName="nimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@nimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="nimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="zanr" ColumnName="zanr" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@zanr" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="zanr" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="aasta" ColumnName="aasta" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@aasta" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="aasta" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateShortCommands="true" GeneratorSourceName="OtsiFilmi" Modifier="Public" Name="OtsiFilmi" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy4" UserSourceName="OtsiFilmi">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT film_id, nimi, zanr, saadaval FROM Film WHERE (nimi = @nimi) OR (zanr = @zanr) OR (aasta = @aasta)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="nimi" ColumnName="nimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@nimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="nimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="zanr" ColumnName="zanr" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@zanr" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="zanr" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="aasta" ColumnName="aasta" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(4)" DbType="Int32" Direction="Input" ParameterName="@aasta" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="aasta" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="Unikaalne" Modifier="Public" Name="Unikaalne" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy5" UserSourceName="Unikaalne">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT MAX(film_id) FROM Film</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="UuendaFilmi" Modifier="Public" Name="UuendaFilmi" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy6" UserSourceName="UuendaFilmi">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE       Film
SET                nimi = @nimi, zanr = @zanr, aasta=@aasta
where film_id=@film_id
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="nimi" ColumnName="nimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@nimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="nimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="zanr" ColumnName="zanr" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@zanr" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="zanr" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="aasta" ColumnName="aasta" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@aasta" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="aasta" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="film_id" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@film_id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="LaenutusTableAdapter" GeneratorDataComponentClassName="LaenutusTableAdapter" Name="Laenutus" UserDataComponentName="LaenutusTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Laenutus" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [Laenutus] ([laenutus_id], [id], [film_id], [tkp], [aktiivne], [tegeliktkp]) VALUES (@laenutus_id, @id, @film_id, @tkp, @aktiivne, @tegeliktkp)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@laenutus_id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="laenutus_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@film_id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@tkp" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="tkp" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@aktiivne" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="aktiivne" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Date" Direction="Input" ParameterName="@tegeliktkp" Precision="0" ProviderType="Date" Scale="0" Size="0" SourceColumn="tegeliktkp" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT * FROM Laenutus</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="laenutus_id" DataSetColumn="laenutus_id" />
              <Mapping SourceColumn="id" DataSetColumn="id" />
              <Mapping SourceColumn="film_id" DataSetColumn="film_id" />
              <Mapping SourceColumn="aktiivne" DataSetColumn="aktiivne" />
              <Mapping SourceColumn="tkp" DataSetColumn="tkp" />
              <Mapping SourceColumn="tegeliktkp" DataSetColumn="tegeliktkp" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="GetLaenutused" GetMethodModifier="Public" GetMethodName="GetLaenutused" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetLaenutused" UserSourceName="GetLaenutused">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        a.nimi, a.film_id, b.eesnimi, b.perenimi, b.id, CAST(c.tkp AS DATE) AS tkp, c.laenutus_id, c.aktiivne
FROM            Laenutus AS c INNER JOIN
                         Film AS a ON c.film_id = a.film_id INNER JOIN
                         Klient AS b ON c.id = b.id
WHERE        (c.aktiivne = 'A')
ORDER BY tkp</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="HangiTopLaenutused" GeneratorSourceName="HangiTop" GetMethodModifier="Public" GetMethodName="HangiTopLaenutused" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="HangiTopLaenutused" UserSourceName="HangiTopLaenutused">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        TOP (5) b.nimi, COUNT(a.film_id) AS Kokku
FROM            Laenutus AS a INNER JOIN
                         Film AS b ON a.film_id = b.film_id
GROUP BY b.nimi
ORDER BY Kokku</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Laenutus" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="KontrolliAjalugu" GetMethodModifier="Public" GetMethodName="KontrolliAjalugu" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="KontrolliAjalugu" UserSourceName="KontrolliAjalugu">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        laenutus_id, id, film_id, tkp, aktiivne, tegeliktkp
FROM            Laenutus
WHERE        (id = @id) AND (tegeliktkp &gt;= tkp)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="LisaLaenutus" Modifier="Public" Name="LisaLaenutus" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="LisaLaenutus">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>INSERT INTO Laenutus
                         (laenutus_id, id, film_id, tkp, aktiivne)
VALUES        (@id,@klient,@film,@tkp, 'A')</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="id" ColumnName="laenutus_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="laenutus_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="klient" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@klient" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="film" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@film" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="tkp" ColumnName="tkp" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="date" DbType="Date" Direction="Input" ParameterName="@tkp" Precision="0" ProviderType="Date" Scale="0" Size="3" SourceColumn="tkp" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="MuudaFilmiOlekSaadavaks" Modifier="Public" Name="MuudaFilmiOlekSaadavaks" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy1" UserSourceName="MuudaFilmiOlekSaadavaks">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE       Film
SET                saadaval = 'Y'
WHERE        (film_id =
                             (SELECT        film_id
                               FROM            Laenutus
                               WHERE        (laenutus_id = @laenutus)))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="laenutus" ColumnName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@laenutus" Precision="0" Scale="0" Size="4" SourceColumn="" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="MuudaFilmiOlekut" Modifier="Public" Name="MuudaFilmiOlekut" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy2" UserSourceName="MuudaFilmiOlekut">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE Film set saadaval='N' where film_id=@film</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="film" ColumnName="film_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@film" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="film_id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="TagastaFilm" Modifier="Public" Name="TagastaFilm" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy3" UserSourceName="TagastaFilm">
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>UPDATE       Laenutus
SET                aktiivne = 'M', tegeliktkp = @ttkp
WHERE        (laenutus_id = @laenutus)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="ttkp" ColumnName="tegeliktkp" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="date" DbType="Date" Direction="Input" ParameterName="@ttkp" Precision="0" ProviderType="DateTime" Scale="0" Size="3" SourceColumn="tegeliktkp" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="laenutus" ColumnName="laenutus_id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@laenutus" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="laenutus_id" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="Unikaalne" Modifier="Public" Name="Unikaalne" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy4" UserSourceName="Unikaalne">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT MAX(laenutus_id) FROM Laenutus</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="StatAdapter" GeneratorDataComponentClassName="StatAdapter" Name="Stat" UserDataComponentName="StatAdapter">
            <MainSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        b.nimi, COUNT(a.film_id) AS Kokku
FROM            Film AS b INNER JOIN
                         Laenutus AS a ON b.film_id = a.film_id
GROUP BY b.nimi
ORDER BY Kokku</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="nimi" DataSetColumn="nimi" />
              <Mapping SourceColumn="Kokku" DataSetColumn="Kokku" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="HangiHapudLaenutused" GetMethodModifier="Public" GetMethodName="HangiHapudLaenutused" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="HangiHapudLaenutused" UserSourceName="HangiHapudLaenutused">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        b.nimi, c.tkp, a.email
FROM            Klient AS a INNER JOIN
                         Laenutus AS c ON a.id = c.id INNER JOIN
                         Film AS b ON c.film_id = b.film_id
WHERE        (c.tkp &lt; GETDATE()) AND (c.aktiivne = 'A')</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="HangiTopLaenutused" GetMethodModifier="Public" GetMethodName="HangiTopLaenutused" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="HangiTopLaenutused" UserSourceName="HangiTopLaenutused">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        b.nimi, COUNT(a.film_id) AS Kokku
FROM            Film AS b INNER JOIN
                         Laenutus AS a ON b.film_id = a.film_id
GROUP BY b.nimi
ORDER BY Kokku desc</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Laenutus" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="KontrolliLaenutust" GetMethodModifier="Public" GetMethodName="KontrolliLaenutust" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="KontrolliLaenutust" UserSourceName="KontrolliLaenutust">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        b.id
FROM            Klient AS a INNER JOIN
                         Laenutus AS b ON a.id = b.id
WHERE        (b.aktiivne = 'A') AND (b.id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectType="Unknown" GenerateShortCommands="true" GeneratorSourceName="KontrolliMaxLaenutusi" Modifier="Public" Name="KontrolliMaxLaenutusi" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="KontrolliMaxLaenutusi">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        COUNT(a.id) AS Summa
FROM            Laenutus AS a INNER JOIN
                         Klient AS b ON a.id = b.id
WHERE        (a.aktiivne = 'A') AND (a.id = @id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="id" ColumnName="id" DataSourceName="[C:\USERS\TOM\DESKTOP\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Laenutus" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="AndmebaasConnectionString1 (Settings)" DbObjectName="dbo.Film" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="true" GeneratorGetMethodName="OtsiFilmi" GetMethodModifier="Public" GetMethodName="OtsiFilmi" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="OtsiFilmi" UserSourceName="OtsiFilmi">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT film_id, nimi, zanr, saadaval FROM Film WHERE (nimi = @nimi) OR (zanr = @zanr) OR (aasta = @aasta)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="true" AutogeneratedName="nimi" ColumnName="nimi" DataSourceName="[C:\USERS\TOM\DESKTOP\LLLL\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(100)" DbType="AnsiString" Direction="Input" ParameterName="@nimi" Precision="0" ProviderType="VarChar" Scale="0" Size="100" SourceColumn="nimi" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="zanr" ColumnName="zanr" DataSourceName="[C:\USERS\TOM\DESKTOP\LLLL\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(50)" DbType="AnsiString" Direction="Input" ParameterName="@zanr" Precision="0" ProviderType="VarChar" Scale="0" Size="50" SourceColumn="zanr" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="aasta" ColumnName="aasta" DataSourceName="[C:\USERS\TOM\DESKTOP\LLLL\LMDB\LMDB\LMDB\ANDMEBAAS.MDF].dbo.Film" DataTypeServer="varchar(4)" DbType="AnsiString" Direction="Input" ParameterName="@aasta" Precision="0" ProviderType="VarChar" Scale="0" Size="4" SourceColumn="aasta" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="AndmebaasDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="AndmebaasDataSet" msprop:Generator_UserDSName="AndmebaasDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Klient" msprop:Generator_TableClassName="KlientDataTable" msprop:Generator_TableVarName="tableKlient" msprop:Generator_TablePropName="Klient" msprop:Generator_RowDeletingName="KlientRowDeleting" msprop:Generator_UserTableName="Klient" msprop:Generator_RowChangingName="KlientRowChanging" msprop:Generator_RowEvHandlerName="KlientRowChangeEventHandler" msprop:Generator_RowDeletedName="KlientRowDeleted" msprop:Generator_RowEvArgName="KlientRowChangeEvent" msprop:Generator_RowChangedName="KlientRowChanged" msprop:Generator_RowClassName="KlientRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="email" msprop:Generator_ColumnVarNameInTable="columnemail" msprop:Generator_ColumnPropNameInRow="email" msprop:Generator_ColumnPropNameInTable="emailColumn" msprop:Generator_UserColumnName="email" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="eesnimi" msprop:Generator_ColumnVarNameInTable="columneesnimi" msprop:Generator_ColumnPropNameInRow="eesnimi" msprop:Generator_ColumnPropNameInTable="eesnimiColumn" msprop:Generator_UserColumnName="eesnimi" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="id" msprop:Generator_ColumnVarNameInTable="columnid" msprop:Generator_ColumnPropNameInRow="id" msprop:Generator_ColumnPropNameInTable="idColumn" msprop:Generator_UserColumnName="id" type="xs:int" />
              <xs:element name="perenimi" msprop:Generator_ColumnVarNameInTable="columnperenimi" msprop:Generator_ColumnPropNameInRow="perenimi" msprop:Generator_ColumnPropNameInTable="perenimiColumn" msprop:Generator_UserColumnName="perenimi" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="aktiivne" msprop:Generator_ColumnVarNameInTable="columnaktiivne" msprop:Generator_ColumnPropNameInRow="aktiivne" msprop:Generator_ColumnPropNameInTable="aktiivneColumn" msprop:Generator_UserColumnName="aktiivne" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Film" msprop:Generator_TableClassName="FilmDataTable" msprop:Generator_TableVarName="tableFilm" msprop:Generator_TablePropName="Film" msprop:Generator_RowDeletingName="FilmRowDeleting" msprop:Generator_UserTableName="Film" msprop:Generator_RowChangingName="FilmRowChanging" msprop:Generator_RowEvHandlerName="FilmRowChangeEventHandler" msprop:Generator_RowDeletedName="FilmRowDeleted" msprop:Generator_RowEvArgName="FilmRowChangeEvent" msprop:Generator_RowChangedName="FilmRowChanged" msprop:Generator_RowClassName="FilmRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="film_id" msprop:Generator_ColumnVarNameInTable="columnfilm_id" msprop:Generator_ColumnPropNameInRow="film_id" msprop:Generator_ColumnPropNameInTable="film_idColumn" msprop:Generator_UserColumnName="film_id" type="xs:int" />
              <xs:element name="nimi" msprop:Generator_ColumnVarNameInTable="columnnimi" msprop:Generator_ColumnPropNameInRow="nimi" msprop:Generator_ColumnPropNameInTable="nimiColumn" msprop:Generator_UserColumnName="nimi" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="zanr" msprop:Generator_ColumnVarNameInTable="columnzanr" msprop:Generator_ColumnPropNameInRow="zanr" msprop:Generator_ColumnPropNameInTable="zanrColumn" msprop:Generator_UserColumnName="zanr" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="aasta" msprop:Generator_ColumnVarNameInTable="columnaasta" msprop:Generator_ColumnPropNameInRow="aasta" msprop:Generator_ColumnPropNameInTable="aastaColumn" msprop:Generator_UserColumnName="aasta" type="xs:int" minOccurs="0" />
              <xs:element name="saadaval" msprop:Generator_ColumnVarNameInTable="columnsaadaval" msprop:Generator_ColumnPropNameInRow="saadaval" msprop:Generator_ColumnPropNameInTable="saadavalColumn" msprop:Generator_UserColumnName="saadaval" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Laenutus" msprop:Generator_TableClassName="LaenutusDataTable" msprop:Generator_TableVarName="tableLaenutus" msprop:Generator_TablePropName="Laenutus" msprop:Generator_RowDeletingName="LaenutusRowDeleting" msprop:Generator_UserTableName="Laenutus" msprop:Generator_RowChangingName="LaenutusRowChanging" msprop:Generator_RowEvHandlerName="LaenutusRowChangeEventHandler" msprop:Generator_RowDeletedName="LaenutusRowDeleted" msprop:Generator_RowEvArgName="LaenutusRowChangeEvent" msprop:Generator_RowChangedName="LaenutusRowChanged" msprop:Generator_RowClassName="LaenutusRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="laenutus_id" msprop:Generator_ColumnVarNameInTable="columnlaenutus_id" msprop:Generator_ColumnPropNameInRow="laenutus_id" msprop:Generator_ColumnPropNameInTable="laenutus_idColumn" msprop:Generator_UserColumnName="laenutus_id" type="xs:int" />
              <xs:element name="id" msprop:Generator_ColumnVarNameInTable="columnid" msprop:Generator_ColumnPropNameInRow="id" msprop:Generator_ColumnPropNameInTable="idColumn" msprop:Generator_UserColumnName="id" type="xs:int" minOccurs="0" />
              <xs:element name="film_id" msprop:Generator_ColumnVarNameInTable="columnfilm_id" msprop:Generator_ColumnPropNameInRow="film_id" msprop:Generator_ColumnPropNameInTable="film_idColumn" msprop:Generator_UserColumnName="film_id" type="xs:int" minOccurs="0" />
              <xs:element name="tkp" msdata:DateTimeMode="Unspecified" msprop:Generator_ColumnVarNameInTable="columntkp" msprop:Generator_ColumnPropNameInRow="tkp" msprop:Generator_ColumnPropNameInTable="tkpColumn" msprop:Generator_UserColumnName="tkp" type="xs:dateTime" minOccurs="0" />
              <xs:element name="aktiivne" msprop:Generator_ColumnVarNameInTable="columnaktiivne" msprop:Generator_ColumnPropNameInRow="aktiivne" msprop:Generator_ColumnPropNameInTable="aktiivneColumn" msprop:Generator_UserColumnName="aktiivne" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="1" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="tegeliktkp" msprop:Generator_ColumnVarNameInTable="columntegeliktkp" msprop:Generator_ColumnPropNameInRow="tegeliktkp" msprop:Generator_ColumnPropNameInTable="tegeliktkpColumn" msprop:Generator_UserColumnName="tegeliktkp" type="xs:dateTime" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Stat" msprop:Generator_TableClassName="StatDataTable" msprop:Generator_TableVarName="tableStat" msprop:Generator_TablePropName="Stat" msprop:Generator_RowDeletingName="StatRowDeleting" msprop:Generator_UserTableName="Stat" msprop:Generator_RowChangingName="StatRowChanging" msprop:Generator_RowEvHandlerName="StatRowChangeEventHandler" msprop:Generator_RowDeletedName="StatRowDeleted" msprop:Generator_RowEvArgName="StatRowChangeEvent" msprop:Generator_RowChangedName="StatRowChanged" msprop:Generator_RowClassName="StatRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="nimi" msprop:Generator_ColumnVarNameInTable="columnnimi" msprop:Generator_ColumnPropNameInRow="nimi" msprop:Generator_ColumnPropNameInTable="nimiColumn" msprop:Generator_UserColumnName="nimi" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Kokku" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnKokku" msprop:Generator_ColumnPropNameInRow="Kokku" msprop:Generator_ColumnPropNameInTable="KokkuColumn" msprop:Generator_UserColumnName="Kokku" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Klient" />
      <xs:field xpath="mstns:id" />
    </xs:unique>
    <xs:unique name="Film_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Film" />
      <xs:field xpath="mstns:film_id" />
    </xs:unique>
    <xs:unique name="Laenutus_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Laenutus" />
      <xs:field xpath="mstns:laenutus_id" />
    </xs:unique>
    <xs:keyref name="FK_Film_Laenutus" refer="Film_Constraint1" msdata:ConstraintOnly="true">
      <xs:selector xpath=".//mstns:Laenutus" />
      <xs:field xpath="mstns:film_id" />
    </xs:keyref>
    <xs:keyref name="Klient_Laenutus" refer="Constraint1" msdata:ConstraintOnly="true" msdata:UpdateRule="None" msdata:DeleteRule="None">
      <xs:selector xpath=".//mstns:Laenutus" />
      <xs:field xpath="mstns:id" />
    </xs:keyref>
  </xs:element>
</xs:schema>